using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace WorkOrder.Models
{
[Table("工单流程实例表")]
public class 工单流程实例表
{
    [Key]
    [Column("实例ID")]
    [StringLength(50)]
    public string 实例ID { get; set; } = Guid.NewGuid().ToString();

    [Column("工单ID")]
    [StringLength(50)]
    public string 工单ID { get; set; }

    [Column("流程ID")]    
    [StringLength(50)]
    public string 流程ID { get; set; }

    [Column("当前节点ID")]
    [StringLength(50)]
    public string 当前节点ID { get; set; }
    [StringLength(20)]

    public WorkOrderStatus 状态 { get; set; } 

    [Column(TypeName = "datetime")]
    public DateTime 创建时间 { get; set; } = DateTime.Now;

    [Column(TypeName = "datetime")]
    public DateTime 更新时间 { get; set; } = DateTime.Now;

    [ForeignKey("工单ID")]
    public virtual 工单主表 工单 { get; set; }

    [ForeignKey("流程ID")]
    public virtual 流程配置表 流程 { get; set; }

    [ForeignKey("当前节点ID")]
    public virtual 流程节点表 当前节点 { get; set; }

 
}
}